package service.impl;

import common.Exception.Results;
import dto.req.AuthorDeleteArticleReqDTO;
import dto.req.AuthorPublishArticleReqDTO;
import dto.req.UpdateArticleContextReqDTO;
import dto.req.UpdateArticleTitleReqDTO;
import dto.resp.AdminQueryWaitViewArticleRespDTO;
import dto.resp.QueryOneArticleByIdRespDTO;
import entity.ArticleDO;

import java.util.ArrayList;

public interface ArticleServiceImpl {
    boolean addArticle(AuthorPublishArticleReqDTO articleDO);

    Results updateArticleTitle(UpdateArticleTitleReqDTO request);


    Results updateArticleContext(UpdateArticleContextReqDTO request);


    Results deleteArticle(AuthorDeleteArticleReqDTO authorDeleteArticleReqDTO);


    /**
     * 查询某一作者的所有文章
     */
    Results<ArrayList<QueryOneArticleByIdRespDTO>> queryAllArticleByAuthorId(Integer authorId);


    /**
     * 查询某一文章
     */
    Results<QueryOneArticleByIdRespDTO> queryOneArticleById(Integer articleId);

    boolean clickFavorite(Integer articleId);

    /**
     * 文章审核功能
     */
    Results viewArticle(Integer articleId);

    /**
     * 查询所有待审核文章
     */
    Results<ArrayList<AdminQueryWaitViewArticleRespDTO>> queryWaitViewArticleAll(Integer idx);
}
